{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\"\"\"Manually build a mesh.\"\"\"\n",
    "\n",
    "from vedo import *\n",
    "\n",
    "#embedWindow('itkwidgets') # or k3d\n",
    "\n",
    "verts = [(50,50,50), (70,40,50), (50,40,80), (80,70,50)]\n",
    "faces = [(0,1,2), (2,1,3), (1,0,3)]\n",
    "# (the first triangle face is formed by vertex 0, 1 and 2)\n",
    "\n",
    "m = Mesh([verts, faces])\n",
    "\n",
    "# the way vertices are assembled into polygons can be retrieved\n",
    "# in two different formats:\n",
    "printc('points():\\n', m.points())\n",
    "printc('faces(): \\n', m.faces())\n",
    "\n",
    "m.show(axes=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
